Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(outputs.influxdb_v2): Add rate limit implementation #15742

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Aug 14, 2024

Summary

This PR adds the basic infrastructure to add rate-limiting to output plugins. As an example it converts the InfluxDBv2 plugin to the new infrastructure.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #tbd

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Aug 14, 2024
@srebhan srebhan added the plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins label Aug 14, 2024
@srebhan srebhan self-assigned this Aug 16, 2024
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srebhan - this is a great piece of work. Clearly this needs to be broken up into a variety of PRs to make reviewing easier, however, it accomplishes the goal nicely. I love that you were able to make the size + period config option work.

From the performance side, this nicely appears to have no affect on other existing use cases or if it no set.

I would have you consider working with support to have someone there test this out as well.

@srebhan
Copy link
Member Author

srebhan commented Aug 20, 2024

Thanks @powersj for your review. I'll adapt the spec then to reflect the possibility to set byte-based rate limits. I'll also break down the PR as it includes at least

  • rework InfluxDBv2 plugin
  • cleanup InfluxDBv2 plugin tests
  • being able for an output plugin to selectively drop metrics from a batch (which probably needs another spec)
  • implement a rate limiter
  • adapt InfluxDBv2 to use the ratelimiter

Thanks again for the review!

@srebhan srebhan changed the title feat(output): Add rate limit implementation feat(output.influxdbv2): Add rate limit implementation Aug 21, 2024
@srebhan srebhan changed the title feat(output.influxdbv2): Add rate limit implementation feat(output.influxdb_v2): Add rate limit implementation Aug 21, 2024
@srebhan srebhan changed the title feat(output.influxdb_v2): Add rate limit implementation feat(output.influxdb): Add rate limit implementation Aug 21, 2024
@srebhan srebhan changed the title feat(output.influxdb): Add rate limit implementation feat(outputs.influxdb): Add rate limit implementation Aug 21, 2024
@srebhan srebhan changed the title feat(outputs.influxdb): Add rate limit implementation feat(outputs.influxdb_v2): Add rate limit implementation Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/influxdb feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants